﻿@using MealBooking.Core.Models.Dishes;
@model List<Dish>
@{
    ViewBag.HeaderTitle = "All Dishes";
    Layout = "../Shared/_Layout.cshtml";
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    @Html.Partial("_FloatRightPartial")
</div>
<!--Navbar End-->
<ul data-role="listview" data-inset="true" data-mini="true">
    @{
        var dishes = Model;
        if (dishes == null || dishes.Count == 0)
        {
        <li data-role="list-divider"></li>
        <li><a href="@Url.Action("AddNewDish")">No Dishes Yet. Click to Add New Dish</a></li>
        }
        else
        {
        <li data-role="list-divider"><span class="ui-li-count">@dishes.Count</span> </li>
            foreach (var dish in dishes)
            {
        <li><a href="@Url.Action("DishDetail", new { id = dish.Id })">
            @dish.Name [Price : @dish.Price]</a></li>
            }
        }
    }
</ul>
